package com.example.applicationnews;

import android.os.Parcel;
import android.os.Parcelable;

public class Stars implements Parcelable {
    String news_title;
    String news_author;
    String news_pic;
    String news_url;
    String news_time;
    public Stars() {
    }

    public Stars(String news_title, String news_author, String news_pic, String news_url, String news_time) {
        this.news_title = news_title;
        this.news_author = news_author;
        this.news_pic = news_pic;
        this.news_url = news_url;
        this.news_time = news_time;
    }

    protected Stars(Parcel in) {
        news_url = in.readString();
        news_pic = in.readString();
        news_author = in.readString();
        news_title = in.readString();
        news_time = in.readString();
    }

    public static final Creator<Stars> CREATOR = new Creator<Stars>() {
        @Override
        public Stars createFromParcel(Parcel in) {
            return new Stars(in);
        }

        @Override
        public Stars[] newArray(int size) {
            return new Stars[size];
        }
    };
    public String getNews_title() {
        return news_title;
    }
    public String getNews_author() {
        return news_author;
    }
    public String getNews_pic() {
        return news_pic;
    }
    public String getNews_url() {
        return news_url;
    }
    public String getNews_time() {
        return news_time;
    }
    public static Creator<Stars> getCREATOR() {
        return CREATOR;
    }
    public void setNews_title(String news_title) {
        this.news_title = news_title;
    }
    public void setNews_author(String news_author) {
        this.news_author = news_author;
    }
    public void setNews_pic(String news_pic) {
        this.news_pic = news_pic;
    }
    public void setNews_url(String news_url) {
        this.news_url = news_url;
    }
    public void setNews_time(String news_time) {
        this.news_time = news_time;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(news_author);
        dest.writeString(news_url);
        dest.writeString(news_pic);
        dest.writeString(news_title);
        dest.writeString(news_time);
    }
}

